import React, { memo, useEffect } from 'react';
import  { useDispatch } from 'react-redux';
import { Input } from 'antd';
const { Search } = Input;

import { getSearchListAction } from './store/actionCreators';

function SearchInput() {
  const dispatch = useDispatch();
  useEffect(() => {
    dispatch(getSearchListAction("起风了"))
  }, [dispatch]);
  return (
    <div className="search">
      <Search
        placeholder="搜索"
        allowClear
        style={{ width: 200 }}
      />
      </div>
  )
}
export default memo(SearchInput);
